Optimal. Leaf size=84 \[ \frac {(b e-a f) (d e-c f) \log (e+f x)}{f^2 (f g-e h)}-\frac {(b g-a h) (d g-c h) \log (g+h x)}{h^2 (f g-e h)}+\frac {b d x}{f h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {142} \[ \frac {(b e-a f) (d e-c f) \log (e+f x)}{f^2 (f g-e h)}-\frac {(b g-a h) (d g-c h) \log (g+h x)}{h^2 (f g-e h)}+\frac {b d x}{f h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 142
Rubi steps
\begin {align*} \int \frac {(a+b x) (c+d x)}{(e+f x) (g+h x)} \, dx &=\int \left (\frac {b d}{f h}+\frac {(-b e+a f) (-d e+c f)}{f (f g-e h) (e+f x)}+\frac {(-b g+a h) (-d g+c h)}{h (-f g+e h) (g+h x)}\right ) \, dx\\ &=\frac {b d x}{f h}+\frac {(b e-a f) (d e-c f) \log (e+f x)}{f^2 (f g-e h)}-\frac {(b g-a h) (d g-c h) \log (g+h x)}{h^2 (f g-e h)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 85, normalized size = 1.01 \[ \frac {f (b d h x (f g-e h)-f (b g-a h) (d g-c h) \log (g+h x))+h^2 (b e-a f) (d e-c f) \log (e+f x)}{f^2 h^2 (f g-e h)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.79, size = 117, normalized size = 1.39 \[ \frac {{\left (b d e^{2} + a c f^{2} - {\left (b c + a d\right )} e f\right )} h^{2} \log \left (f x + e\right ) + {\left (b d f^{2} g h - b d e f h^{2}\right )} x - {\left (b d f^{2} g^{2} + a c f^{2} h^{2} - {\left (b c + a d\right )} f^{2} g h\right )} \log \left (h x + g\right )}{f^{3} g h^{2} - e f^{2} h^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.25, size = 112, normalized size = 1.33 \[ \frac {b d x}{f h} + \frac {{\left (a c f^{2} - b c f e - a d f e + b d e^{2}\right )} \log \left ({\left | f x + e \right |}\right )}{f^{3} g - f^{2} h e} - \frac {{\left (b d g^{2} - b c g h - a d g h + a c h^{2}\right )} \log \left ({\left | h x + g \right |}\right )}{f g h^{2} - h^{3} e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 196, normalized size = 2.33 \[ -\frac {a c \ln \left (f x +e \right )}{e h -f g}+\frac {a c \ln \left (h x +g \right )}{e h -f g}+\frac {a d e \ln \left (f x +e \right )}{\left (e h -f g \right ) f}-\frac {a d g \ln \left (h x +g \right )}{\left (e h -f g \right ) h}+\frac {b c e \ln \left (f x +e \right )}{\left (e h -f g \right ) f}-\frac {b c g \ln \left (h x +g \right )}{\left (e h -f g \right ) h}-\frac {b d \,e^{2} \ln \left (f x +e \right )}{\left (e h -f g \right ) f^{2}}+\frac {b d \,g^{2} \ln \left (h x +g \right )}{\left (e h -f g \right ) h^{2}}+\frac {b d x}{f h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 104, normalized size = 1.24 \[ \frac {b d x}{f h} + \frac {{\left (b d e^{2} + a c f^{2} - {\left (b c + a d\right )} e f\right )} \log \left (f x + e\right )}{f^{3} g - e f^{2} h} - \frac {{\left (b d g^{2} + a c h^{2} - {\left (b c + a d\right )} g h\right )} \log \left (h x + g\right )}{f g h^{2} - e h^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.97, size = 105, normalized size = 1.25 \[ \frac {\ln \left (e+f\,x\right )\,\left (a\,c\,f^2-f\,\left (a\,d\,e+b\,c\,e\right )+b\,d\,e^2\right )}{f^3\,g-e\,f^2\,h}+\frac {\ln \left (g+h\,x\right )\,\left (a\,c\,h^2-h\,\left (a\,d\,g+b\,c\,g\right )+b\,d\,g^2\right )}{e\,h^3-f\,g\,h^2}+\frac {b\,d\,x}{f\,h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 20.49, size = 507, normalized size = 6.04 \[ \frac {b d x}{f h} + \frac {\left (a h - b g\right ) \left (c h - d g\right ) \log {\left (x + \frac {a c e f h^{2} + a c f^{2} g h - 2 a d e f g h - 2 b c e f g h + b d e^{2} g h + b d e f g^{2} - \frac {e^{2} f h \left (a h - b g\right ) \left (c h - d g\right )}{e h - f g} + \frac {2 e f^{2} g \left (a h - b g\right ) \left (c h - d g\right )}{e h - f g} - \frac {f^{3} g^{2} \left (a h - b g\right ) \left (c h - d g\right )}{h \left (e h - f g\right )}}{2 a c f^{2} h^{2} - a d e f h^{2} - a d f^{2} g h - b c e f h^{2} - b c f^{2} g h + b d e^{2} h^{2} + b d f^{2} g^{2}} \right )}}{h^{2} \left (e h - f g\right )} - \frac {\left (a f - b e\right ) \left (c f - d e\right ) \log {\left (x + \frac {a c e f h^{2} + a c f^{2} g h - 2 a d e f g h - 2 b c e f g h + b d e^{2} g h + b d e f g^{2} + \frac {e^{2} h^{3} \left (a f - b e\right ) \left (c f - d e\right )}{f \left (e h - f g\right )} - \frac {2 e g h^{2} \left (a f - b e\right ) \left (c f - d e\right )}{e h - f g} + \frac {f g^{2} h \left (a f - b e\right ) \left (c f - d e\right )}{e h - f g}}{2 a c f^{2} h^{2} - a d e f h^{2} - a d f^{2} g h - b c e f h^{2} - b c f^{2} g h + b d e^{2} h^{2} + b d f^{2} g^{2}} \right )}}{f^{2} \left (e h - f g\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________